<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
    <meta charset="UTF-8">
    <title>视频通话</title>
    <script>
        function joinCall() {
            var rId = roomId.value;
            var uId = userId.value;

            if (!rId) {
                alert("请输入roomId");
                return;
            }

            if (!uId) {
                alert("请输入userId");
                return;
            }

            result.innerHTML = "";
            var abc = {
                roomId: rId,
                userId: uId,
                closeCallback: "closeCallback"
            };
            // alert(JSON.stringify(abc));
            window.wanxiao_videoCall.executeBindMethod('startJoinRoom', JSON.stringify(abc));
        }

        function closeCallback() {
            result.innerHTML = "通话结束";
        }

    </script>

</head>
<body>

<div style="display: flex;flex-direction: row;align-items: center">
    <h3>视频通话测试</h3>
    <a style="margin-left: 20px" href="javascript:location.reload()"><h5>刷新</h5></a>
</div>

<label>
    roomId：
    <input type="text" id="roomId" value="12345">
</label>
<br>
<label>
    userId：
    <input type="text" id="userId" value="teacher">
</label>
<br />
<br />
<button onclick="joinCall()">开始通话</button>
<br />
<br />
<label id="result"></label>

</body>
</html>
